﻿<%@ Page Language="C#" MasterPageFile="~/adm-Master.Master" AutoEventWireup="true" CodeBehind="Product.aspx.cs" Inherits="BookStore.admin.Product" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            height: 25px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="PageName">Product Manager</div>
    
<asp:Panel ID="pnView" runat="server">

<div class="Control">
    <ul>
        <li>
            <asp:LinkButton CssClass="vadd" ID="lbtAddT" runat="server" onclick="lbtAddT_Click1" 
                >Add new</asp:LinkButton>
        </li> 
        <li>
            <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshT" runat="server" onclick="lbtRefreshT_Click" 
                >Refesh</asp:LinkButton>
        </li> 
        <li> 
            <a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">
            Back</a> </li> 
    </ul>
</div>
    <asp:GridView ID="gvProduct" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" BorderWidth="1px" Width="100%" 
        onrowdeleting="gvProduct_RowDeleting" 
        onselectedindexchanging="gvProduct_SelectedIndexChanging" 
        onpageindexchanging="gvProduct_PageIndexChanging" >
        <Columns>
            <asp:BoundField DataField="productID" HeaderText="ProductID" />
            <asp:BoundField DataField="catogoryID" HeaderText="CatogoryID" />
            <asp:BoundField DataField="productName" HeaderText="Product Name" />
            <asp:BoundField DataField="manufacturerID" HeaderText="manufacturerID" />
            <asp:BoundField DataField="price" HeaderText="Price" />
             <asp:BoundField DataField="quantity" HeaderText="Quantity" />
            <asp:BoundField DataField="sale" HeaderText="Sale" />
            <asp:BoundField DataField="authorID" HeaderText="authorID" />
            <asp:BoundField DataField="description" HeaderText="Description" />
            <asp:BoundField DataField="images" HeaderText="images" />
            <asp:CommandField ShowDeleteButton="True" />
            <asp:CommandField ShowSelectButton="True" />
        </Columns>
    </asp:GridView>
<div class="Control">
    <ul>
        <li>
            <asp:LinkButton CssClass="vadd" ID="lbtAddB" runat="server" onclick="lbtAddT_Click1" 
                >Add new</asp:LinkButton>
        </li> 
        <li>
            <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshB" runat="server" onclick="lbtRefreshT_Click" 
                 >Refesh</asp:LinkButton>
        </li> 
        <li>
            <a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">
            Back</a> </li> 
    </ul>
</div>
</asp:Panel>
<asp:Panel ID="pnUpdate" runat="server" Visible="False">
<table class="TableUpdate" border="1">
    <tr> 
        <td class="Control" colspan="2">
            <ul>
                <li>
                    <asp:LinkButton CssClass="uupdate" ID="lbtUpdateT" runat="server" 
                        onclick="lbtUpdate_Click">Save</asp:LinkButton>
                </li> 
                <li> 
                    <asp:LinkButton CssClass="uback" ID="lbtBackT" runat="server" 
                        CausesValidation="False" onclick="lbtBackT_Click" >Back</asp:LinkButton>
                </li> 
            </ul>
        </td> 
    </tr>
    <tr> 
    <th class="style1"> 
        </th>
    <td class="style1"> 
        <asp:TextBox ID="txtProductid" runat="server" Visible="False"></asp:TextBox> </td>
       
     </tr>
    <tr> 
       <th> 
            <asp:Label ID="Label1"  runat="server" Text="Product name:"></asp:Label>
       </th>
       <td>
            <asp:TextBox ID="txtProductname" runat="server" CssClass="Text" Width="183px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtProductname" ErrorMessage="not blank"></asp:RequiredFieldValidator>
       </td>
     </tr>
     <tr> 
        <th> 

            <asp:Label ID="Label2" runat="server" Text="Catogory ID :"></asp:Label>
        </th>
        <td>
            <asp:DropDownList ID="ddlCatogoryid" runat="server" 
                onselectedindexchanged="ddlCatogoryid_SelectedIndexChanged" 
                AutoPostBack="True">
            </asp:DropDownList>
        </td>
     </tr>

            <asp:Label ID="Label3" runat="server" Text="SubCatogory ID:"></asp:Label>
        </th>
      </tr __designer:mapid="288">
    
        <tr>
            <th>
                <asp:Label ID="Label4" runat="server" Text="Manufacture ID:"></asp:Label>
            </th>
            <td>
                <asp:DropDownList ID="ddlManufactureid" runat="server" AutoPostBack="True" 
                    Width="73px" Height="16px">
                </asp:DropDownList>
                <asp:Label ID="lblManu" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <th>
                <asp:Label ID="Label5" runat="server" Text="Price:"></asp:Label>
            </th>
            <td>
                <asp:TextBox ID="txtPrice" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtPrice" ErrorMessage="not blank"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <th class="style1">
                <asp:Label ID="Label6" runat="server" Text="Quantity:"></asp:Label>
            </th>
            <td class="style1">
                <asp:TextBox ID="txtQuantity" runat="server" CssClass="Text"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtQuantity" ErrorMessage="not blank"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <th>
                <asp:Label ID="Label7" runat="server" Text="Sale:"></asp:Label>
            </th>
            <td>
                <asp:RadioButton ID="rdbSale" runat="server" Text="Sale" />
            </td>
        </tr>
        <tr>
            <th>
                <asp:Label ID="Label8" runat="server" Text="Author ID:"></asp:Label>
            </th>
            <td>
                <asp:DropDownList ID="ddlAuthorid" runat="server" AutoPostBack="True">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <th>
                <asp:Label ID="Label9" runat="server" Text="Description:"></asp:Label>
            </th>
            <td>
                <asp:TextBox ID="txtDesription" runat="server" CssClass="Text" Height="89px" 
                    TextMode="MultiLine" Width="301px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <th>
                <asp:Label ID="Label10" runat="server" Text="Image:"></asp:Label>
            </th>
            <td>
                <asp:FileUpload ID="fulImg" runat="server" />
                <asp:Button ID="btnLoad" runat="server" onclick="btnLoad_Click" Text="Load" />
                <asp:Image ID="Image1" runat="server" Height="125px" Width="175px" />
            </td>
        </tr>
        <tr>
            <td class="Control" colspan="2">
                <ul>
                    <li>
                        <asp:LinkButton ID="lbtUpdate" runat="server" CssClass="uupdate" 
                            onclick="lbtUpdate_Click">Save</asp:LinkButton>
                    </li>
                    <li>
                        <asp:LinkButton ID="lbtBack" runat="server" CausesValidation="False" 
                            CssClass="uback" onclick="lbtBackT_Click">Back</asp:LinkButton>
                    </li>
                </ul>
            </td>
        </tr>
    </caption>
   
</table>
</asp:Panel>
</asp:Content>
